package com.fengchao.dao;

import com.fengchao.model.OdrOrder;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

/**
 * Created by wangnian 2016/7/7.
 */
@Mapper
public interface OdrOrderMapper {

    /**
     * 根据订单编号查询订单
     *
     * @param OderSn
     * @return
     */
    @Select("select *  from odr_order where order_sn = #{orderSn}")
    OdrOrder findOdrOrderByOderSn(String OderSn);


    /**
     * 更新订单
     *
     * @param payChannel
     * @param payTime
     * @param status
     * @param id
     * @return
     */
    @Insert("update  odr_order  set  order_pay_channel=#{payChannel},order_pay_time=#{payTime},order_status=#{status} where id=#{id}")
    Integer update(@Param("payChannel") Integer payChannel,@Param("payTime") Date payTime,@Param("status") String status,@Param("id") Integer id);

}
